import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex)

const store = new Vuex.Store({
		state: {
			token: uni.getStorageSync('token'),
			isReady: false,
			show: true,
			showMid: false,
			barheight:22
		},
		mutations: {
			
			reFreshToken(state,token){
				uni.setStorageSync('token',token)
				state.token = uni.getStorageSync('token')
			},
			removeToken(state){
				uni.removeStorageSync('token')
				state.token = uni.getStorageSync('token')
			},
			setIsReady(state,boolean){
				state.isReady = boolean
			},
			showLoading(state){
				state.show = true
			},
			hideLoading(state){
				state.show = false
			},
			setShowMid(state,flag){
				state.showMid = flag
			}
		},
		actions: {
			
		},
    modules:{
		}
})
export default store